package com.ybxx.base.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ybxx.core.model.BaseModel;

@Entity
@Table(name="tbl_base_room")
public class Room extends BaseModel {
	@Id
	private String rid;
	@ManyToOne(targetEntity=Unit.class,fetch=FetchType.LAZY)
	@JoinColumn(name="uid",referencedColumnName="uid") 
	private Unit unit;
	private String rcode;
	private String state;
	
	
	/**
	 * 
	 */
	public Room() {
		super();
	}
	/**
	 * @param rid
	 */
	public Room(String rid) {
		super();
		this.rid = rid;
	}
	public String getRid() {
		return rid;
	}
	public void setRid(String rid) {
		this.rid = rid;
	}
	public Unit getUnit() {
		return unit;
	}
	public void setUnit(Unit unit) {
		this.unit = unit;
	}
	public String getRcode() {
		return rcode;
	}
	public void setRcode(String rcode) {
		this.rcode = rcode;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	
	
	
	
}
